<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>文章列表-熊猫知识库</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="甜甜圈,知识库,问答系统">
  <meta name="description" content="甜甜圈,知识库,问答系统">
  <#include "/common/header.html">

<div class="main layui-clear">
  <div class="wrap">
    <div class="content">
      <div class="fly-tab fly-tab-index">
        <form action="#" class="fly-search">
          <i class="iconfont icon-sousuo"></i>
          <input class="layui-input" autocomplete="off" placeholder="搜索内容，回车跳转" type="text" name="q">
        </form>
        <a href="/topic/add.html" class="layui-btn jie-add">发布问题</a>
      </div>
      
      	<#if topTopics?if_exists && topTopics?size gt 0>
      <ul class="fly-list fly-list-top">
      	<#list topTopics as item>
        <li class="fly-list-li">
          <a href="/user/${(item.creatorId)!""}.html" class="fly-list-avatar">
          	<img src="<#if  item.creatorAvatar?if_exists>${(item.creatorAvatar)!""}<#else>http://img.kb.itttq.com/avatar/default.png</#if>">
          </a>
          <h2 class="fly-tip">
            <a href="/topic/detail/${(item.id)!0}.html">${(item.title)!""}</a>
            <span class="fly-tip-stick">置顶</span>
          </h2>
          <p>
            <span><a href="/user/${(item.creatorId)!""}.html">${(item.creatorName)!""}</a></span>
            <span>${(item.updateTime)?string('yyyy-MM-dd hh:mm')}</span>
            <span>${(item.categoryName)!""}</span>
            <span class="fly-list-hint" style="top:-2px;">
              <i class="iconfont" title="回答">&#xe60c;</i> ${(item.numberReply)!0}
              <i class="iconfont" title="人气">&#xe60b;</i> ${(item.numberRead)!0}
            </span>
          </p>
        </li>
        </#list>
      </ul>
        </#if>
      
      <ul class="fly-list">
      	<#if latestTopics?if_exists && latestTopics?size gt 0>
      	<#list latestTopics as item>
        <li class="fly-list-li">
          <a href="/user/${(item.creatorId)!""}.html" class="fly-list-avatar">
          	<img src="<#if  item.creatorAvatar?if_exists>${(item.creatorAvatar)!""}<#else>http://img.kb.itttq.com/avatar/default.png</#if>">
          </a>
          <h2 class="fly-tip">
            <a href="/topic/detail/${(item.id)!0}.html">${(item.title)!""}</a>
          </h2>
          <p>
            <span><a href="/user/${(item.creatorId)!""}.html">${(item.creatorName)!""}</a></span>
            <span>${(item.updateTime)?string('yyyy-MM-dd hh:mm')}</span>
            <span><a href="/topic/${(item.categoryId)!""}/index.html">${(item.categoryName)!""}</a></span>
            <span class="fly-list-hint" style="top:-2px;">
              <i class="iconfont" title="回答">&#xe60c;</i> ${(item.numberReply)!0}
              <i class="iconfont" title="人气">&#xe60b;</i> ${(item.numberRead)!0}
            </span>
          </p>
        </li>
        </#list>
        <#else>
        <li class="fly-list-li">
          <h3>暂无记录</h3>
        </li>
        </#if>
      </ul>
      
    	<#import "/common/pager.html" as page>
		<#if count??>
			<#if catId?if_exists>
			<@page.pager pageNo=pn pageSize=ps count=count url="/topic/${catId}/index.html?t=1" gotoPage=true />
			<#else>
			<@page.pager pageNo=pn pageSize=ps count=count url="/topic/index.html?t=1" gotoPage=true />
			</#if>
		</#if>
    </div>
  </div>
  
  <div class="edge">
    <dl class="fly-panel fly-list-one"> 
      <dt class="fly-panel-title">最近热帖</dt>
		<#if mostLookTopics?if_exists && mostLookTopics?size gt 0>
		<#list mostLookTopics as item>
      <dd>
      	<a href="/topic/detail/${(item.id)!0}.html">${(item.title)!""}</a>
        <span><i class="iconfont">&#xe60b;</i> ${(item.numberRead)!0}</span>
      </dd>
      </#list>
      </#if>
    </dl>
    
    <dl class="fly-panel fly-list-one"> 
      <dt class="fly-panel-title">近期热议</dt>
		<#if mostReplyTopics?if_exists && mostReplyTopics?size gt 0>
		<#list mostReplyTopics as item>
      <dd>
      	<a href="/topic/detail/${(item.id)!0}.html">${(item.title)!""}</a>
        <span><i class="iconfont">&#xe60b;</i> ${(item.numberRead)!0}</span>
      </dd>
      </#list>
      </#if>
    </dl>

  </div>
</div>

<#assign jsFilename="index">
<#include "/common/footer.html">
</body>
</html>